﻿@{
    Layout = "~/Views/Shared/_WebLayout.cshtml";
}


<div class="shopcart-box">
        <div class="area">
            
                <link rel="stylesheet" href="/css/validate.css">
                <script type="text/javascript" src="/scripts/jquery/jquery.form.js"></script>
                <script type="text/javascript" src="/scripts/jquery/jquery.validate.min.js"></script>
                <script type="text/javascript" src="/scripts/jquery/messages_cn.js"></script>
                <script type="text/javascript" src="/templates/yuan/js/area.js"></script>
                <script type="text/javascript">
                    $(function () {
                        //表单提交
                        AjaxInitForm('order_form', 'btnSubmit', 0);
                        $("#btnSubAdd").bind("click", function () {
                            $("#order_form").attr("url", "/tools/submit_ajax.ashx?action=add_address");
                            AjaxInitForm('order_form', 'btnSubAdd', 0);
                            if ($("#txtRealName").val() == "") {
                                $.ligerDialog.warn('对不起，请填写收货人姓名！');
                                return false;
                            }
                            if ($("#txtProvince").val() == "") {
                                $.ligerDialog.warn('对不起，请选择所属省份！');
                                return false;
                            }
                            if ($("#txtCity").val() == "") {
                                $.ligerDialog.warn('对不起，请选择所属城市！');
                                return false;
                            }
                            if ($("#txtArea").val() == "") {
                                $.ligerDialog.warn('对不起，请选择所属区域！');
                                return false;
                            }
                            if ($("#txtAddress").val() == "") {
                                $.ligerDialog.warn('对不起，请填写详细街道地址！');
                                return false;
                            }
                            if ($("#txtPostCode").val() == "") {
                                $.ligerDialog.warn('对不起，请填写邮政编码！');
                                return false;
                            }
                            if ($("#txtMobile").val() == "" && $("#txtPhone").val() == "") {
                                $.ligerDialog.warn('对不起，电话和手机必须选填一项！');
                                return false;
                            }
                        });
                        $("#btnSubmit").bind("click", function () {
                            //                        if ($("input[name='addressid']:checked").val() == "") {
                            //                            $.ligerDialog.warn('对不起，请确认收货人信息！');
                            //                            return false;
                            //                        }
                            //                        if ($("input[name='distribution_id']:checked").val() == "") {
                            //                            $.ligerDialog.warn('对不起，请确认配送方式！');
                            //                            return false;
                            //                        }
                            if ($("input[name='payment_id']:checked").val() == "") {
                                $.ligerDialog.warn('对不起，请确认支付方式！');
                                return false;
                            }
                        });
                        $("#txtProvince").change(function () {                                   //更改省份
                            change_province($(this).val());
                        });
                        $("#txtCity").change(function () {                                       //更改城市
                            change_city($(this).val());
                        });
                        load_province(22);
                        change_province(22, 234);
                        change_city(234, 0);

                        $(".addressee").find("li").addClass("clear")
                    });
                </script>
                <form name="order_form" id="order_form" url="/tools/submit_ajax.ashx?action=order_save2">
                <div class="shopcart-top clear">
                    <div class="m-title">
                        我的订单</div>
                    <ul class="m-shopprocess">
                        <li class="li-1 show"></li>
                        <li class="li-2"></li>
                    </ul>
                </div>
                <div class="shopcart-main">
                    <table class="table-shop mgbt-15" cellpadding="0" cellspacing="0" border="0" width="100%">
                        <tbody><tr>
                            <th class="td-1" width="12%">
                                <input id="chkAll" name="chkAll" type="checkbox" value="">
                              <p>  全选</p><p>
                            </p></th>
                            <th class="td-2" width="23%">
                                商品名称
                            </th>
                            <th class="td-3" width="11%">
                                单价
                            </th>
                            <th class="td-4" width="11%">
                                数量
                            </th>
                            <!--<th class="td-5" width="11%">折扣</th>-->
                            <th class="td-6" width="11%">
                                金额
                            </th>
                            <!--<th class="td-7" width="11%">优惠</th>-->
                            <th class="td-8" width="10%">
                                操作
                            </th>
                        </tr>
                        
                        <tr>
                            <td class="td-1">
                                <input name="cart_id" type="checkbox" value="176">
                            </td>
                            <td class="td-2">
                                <div class="proimg clear">
                                    <a href="/goods/show-176.aspx">
                                        <img src="/upload/201409/10/small_201409101355034062.jpg" style="width:40px;"></a>
                                        <p><a href="/goods/show-176.aspx">祝福一生 (套餐：undefined)</a></p>
                                </div>
                            </td>
                          
                            <td class="td-3">
                                ￥169.00
                            </td>
                            <td class="td-4">
                                <div class="pronum clear">
                                    
                                    <input type="text" name="goods_quantity" class="input" style="width: 30px; text-align: center;
                                        ime-mode: Disabled;" value="1" onblur="CartAmountTotal(this, '/', '176');" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))">
                                  
                                </div>
                            </td>
                            <!--<td class="td-5">5折</td>-->
                            <td class="td-6">
                                ￥169.00
                            </td>
                            <!--<td class="td-7"><i>双十一特价</i></td>-->
                            <td class="td-8">
                                <a class="delete" onclick="DeleteCart(this,'/','176');" href="javascript:;">
                                    删除</a><!-- | <a href="#">收藏</a>-->
                            </td>
                        </tr>
                        
                        <tr>
                            <td class="td-1">
                                <input name="cart_id" type="checkbox" value="208">
                            </td>
                            <td class="td-2">
                                <div class="proimg clear">
                                    <a href="/goods/show-208.aspx">
                                        <img src="/upload/201411/07/small_201411072043242343.jpg" style="width:40px;"></a>
                                        <p><a href="/goods/show-208.aspx">母亲的臂弯 (套餐：undefined)</a></p>
                                </div>
                            </td>
                          
                            <td class="td-3">
                                ￥169.00
                            </td>
                            <td class="td-4">
                                <div class="pronum clear">
                                    
                                    <input type="text" name="goods_quantity" class="input" style="width: 30px; text-align: center;
                                        ime-mode: Disabled;" value="1" onblur="CartAmountTotal(this, '/', '208');" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))">
                                  
                                </div>
                            </td>
                            <!--<td class="td-5">5折</td>-->
                            <td class="td-6">
                                ￥169.00
                            </td>
                            <!--<td class="td-7"><i>双十一特价</i></td>-->
                            <td class="td-8">
                                <a class="delete" onclick="DeleteCart(this,'/','208');" href="javascript:;">
                                    删除</a><!-- | <a href="#">收藏</a>-->
                            </td>
                        </tr>
                        
                        <tr>
                        
                            <th colspan="9">
                                <div class="shop-pri">
                                    <p class="p1">
                                        共<b>2</b>件商品</p>
                                    <p class="p2">
                                        商品总价(不含运费)：<b>¥338.00</b></p>
                                </div>
                            </th>
                        </tr>
                    </tbody></table>
                    <script type="text/javascript">
                        function aa(aid, userid, realname) {
                            alert();
                        }
                        function setDefault(id, userid) {
                            $.ajax({
                                type: "post",
                                url: "/tools/submit_ajax.ashx?action=address_setdefault",
                                data: { id: id, userid: userid },
                                dataType: "json",
                                beforeSend: function (XMLHttpRequest) {
                                    //发送前动作
                                },
                                success: function (data, textStatus) {
                                    if (data.msg == 1) {
                                        $.ligerDialog.success(data.msgbox);
                                        location.reload();
                                    } else {
                                        $.ligerDialog.warn(data.msgbox);
                                    }
                                },
                                error: function (XMLHttpRequest, textStatus, errorThrown) {
                                    alert("状态：" + textStatus + "；出错提示：" + errorThrown);
                                },
                                timeout: 20000
                            });
                            return false;
                        }
                    </script>
                    <div class="shopcart-addr content mgbt-15">
                        
                        <ul class="addrul mgbt-20 clear">
                            
                        </ul>
                        <div class="newaddr">
                            <p class="addr-on">
                                添加新地址</p>
                            <div class="addr-de">
                                <h3>
                                    使用新地址</h3>
                                <div class="addr-cn clear">
                                
                                
                                
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tbody><tr>
    <td align="right">收货人姓名：</td>
    <td>    <input name="txtRealName" id="txtRealName" type="text">  <input name="txtAddressId" id="txtAddressId" type="hidden">
                                                <i>*</i></td>
  </tr>
  <tr>
    <td align="right">收货人手机：</td>
    <td>  <input name="txtMobile" id="txtMobile" type="text">
                                                <i>*</i></td>
  </tr>
  <tr>
    <td align="right">  固定电话：</td>
    <td> <input name="txtPhone" id="txtPhone" type="text"></td>
  </tr>
  <tr>
    <td align="right"> 收货地址：</td>
    <td>   <div class="add">
                                                    <select name="txtProvince" id="txtProvince">
                                                        <option value="" selected="">请选择省份</option>
                                                    <option value="1">北京市</option><option value="2">天津市</option><option value="3">河北省</option><option value="4">山西省</option><option value="5">内蒙古自治区</option><option value="6">辽宁省</option><option value="7">吉林省</option><option value="8">黑龙江省</option><option value="9">上海市</option><option value="10">江苏省</option><option value="11">浙江省</option><option value="12">安徽省</option><option value="13">福建省</option><option value="14">江西省</option><option value="15">山东省</option><option value="16">河南省</option><option value="17">湖北省</option><option value="18">湖南省</option><option value="19">广东省</option><option value="20">广西壮族自治区</option><option value="21">海南省</option><option value="22" selected="selected">重庆市</option><option value="23">四川省</option><option value="24">贵州省</option><option value="25">云南省</option><option value="26">西藏自治区</option><option value="27">陕西省</option><option value="28">甘肃省</option><option value="29">青海省</option><option value="30">宁夏回族自治区</option><option value="31">新疆维吾尔自治区</option><option value="32">香港特别行政区</option><option value="33">澳门特别行政区</option><option value="34">台湾省</option></select>
                                                    <select name="txtCity" id="txtCity">
                                                        
                                                    <option value="">请选择城市</option><option value="234" selected="selected">重庆市</option></select>
                                                    <select name="txtArea" id="txtArea" disabled="disabled">
                                                        
                                                    <option value="">请选择区域</option></select>
                                                </div>
                                                <div class="add2">
                                                    <input name="txtAddress" id="txtAddress" type="text">
                                                    <i>*</i></div></td>
  </tr>
  <tr>
    <td align="right"> 邮政编码：</td>
    <td>  <input name="txtPostCode" id="txtPostCode" type="text"></td>
  </tr>
  <tr>
    <td align="right"> 备注信息：</td>
    <td> <textarea name="txtDesc" style="font: 宋体; font-size: 12px" id="txtDesc" cols="" rows="3"></textarea></td>
  </tr>
   <tr>
    <td align="right">   设为默认：</td>
    <td>        <input name="chkDefault" id="chkDefault" type="checkbox" value="">
                                                <input id="txtIsDefault" name="txtIsDefault" type="hidden" value="1"></td>
  </tr>
</tbody></table>

        
                                </div>
                                <div class="addr-btn td-btn">
                                    <input class="submit btn-01 c-btn2" name="" type="submit" value="确认添加" id="btnSubAdd">
                                    <a href="javascript:void(0);" class="close-addr btn-02 c-btn2">取消添加</a>
                                    <script type="text/javascript">
                                        $(function () {
                                            var indelkxhfdsf = 0;
                                            $(".shopcart-addr .addrul li").click(function () {
                                                indelkxhfdsf = $(".shopcart-addr .addrul li").index(this);
                                                $(".shopcart-addr .addrul li").removeClass("current").eq(indelkxhfdsf).addClass("current");
                                            });
                                            $(".newaddr .addr-on").click(function () {
                                                $(".newaddr .addr-on").hide();
                                                $(".newaddr .addr-de").show();
                                            });
                                            $(".addr-de .close-addr").click(function () {
                                                $(".newaddr .addr-on").show();
                                                $(".newaddr .addr-de").hide();
                                            });
                                        });
                                        $(function () {
                                            $("#chkDefault").click(function () {
                                                if ($("#chkDefault").attr("checked") == "checked") {
                                                    $("#txtIsDefault").val("2");
                                                } else {
                                                    $("#txtIsDefault").val("1");
                                                }
                                            })
                                        })
                                    </script>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--shopcart-addr-->
                    <div class="shopcart-pay content mgbt-15 clear">
                        <div>
                            <h3>
                                支付方式</h3>
                            <table class="table-pay mgbt-15" cellpadding="0" cellspacing="0" border="0" width="100%">
                                
                                <!--取得一个DataTable-->
                                
                                <tbody><tr>
                                    <td width="5%" class="td-1">
                                        <input checked="" name="payment_id" type="radio" onclick="PaymentAmountTotal(this);" value="1"><input name="payment_price" type="hidden" value="0.00">
                                    </td>
                                    <td width="12%" class="td-2">
                                        <img src="/images/pay_delivery.gif">
                                    </td>
                                    <td width="73%">
                                        收到商品后进行支付，支持现金和刷卡服务。
                                    </td>
                                    <td width="10%" class="td-4">
                                        ￥0.00
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td width="5%" class="td-1">
                                        <input name="payment_id" type="radio" onclick="PaymentAmountTotal(this);" value="3"><input name="payment_price" type="hidden" value="0.00">
                                    </td>
                                    <td width="12%" class="td-2">
                                        <img src="/images/pay_alipay.gif">
                                    </td>
                                    <td width="73%">
                                        付款后立即到账，无预付/年费，单笔费率阶梯最低0.7%，无流量限制。
                                    </td>
                                    <td width="10%" class="td-4">
                                        ￥0.00
                                    </td>
                                </tr>
                                
                            </tbody></table>
                        </div>
                        <!--shoppay-->
                        <div class="right paytel" style="display: none;">
                            <p class="p1">
                                免费热线：<b>400-996-5200</b></p>
                            <p class="p2">
                                短信预订：<b>15320211399</b></p>
                            <p class="p3">
                                （货号+姓名+地址）</p>
                            <p class="p4">
                                SSL加密支付，安全支付有保障</p>
                            <p class="p5">
                                <img src="images/shop/pay-pic.gif"></p>
                        </div>
                    </div>
                    <!--shopcart-pay-->
                    <div class="shopcart-int content mgbt-15 clear">
                        <div class="int" style="display: none">
                            <input name="" type="checkbox" value=""><b>使用积分</b> <span class="s2">
                                <input name="" type="text"></span>点 <span class="s3">(可用77点)</span> <span class="s4">
                                    - ￥0.00</span>
                        </div>
                        <div class="money">
                            产品金额：<span class="c-red">￥338.00</span>
                            <!--- 商城积分：-->
                            <span class="c-red" style="display: none">￥0</span> 实付款：<b>￥338.00</b><span class="c-gray" style="display: none">（付款可获得203积分）</span>
                        </div>
                    </div>
                    <!--shopcart-int-->
                </div>
                <!--shopcart-main-->
                <div class="shopcart-btn td-btn">
                    <a href="/index.aspx" class="c-btn2 btn-01">继续购物</a>
                    <input id="btnSubmit" name="btnSubmit" type="submit" value="立即付款" class="c-btn2 btn-02">
                </div>
                </form>
                
            </div>
        </div>